<template>
  <div class="my">
    <div class="top">
      <van-nav-bar title="个人中心" left-arrow @click-left="onClickLeft" />
    </div>

    <div class="mine">
      <span>
        <img
          src="https://ts1.cn.mm.bing.net/th/id/R-C.75990ca9a3853bd3532e44b689d24675?rik=bVsNpyr9rFvhcg&riu=http%3a%2f%2fwx3.sinaimg.cn%2flarge%2f006APoFYly1go6s4emixlg301t01tweh.gif&ehk=rlYj%2b50wVQKXvUwlA6LF4qhxyM0dGd%2b2X9YE1T6gAFg%3d&risl=&pid=ImgRaw&r=0"
          alt="">
      </span>
      <span>
        <h2>肉蛋葱鸡</h2>
        <span style="line-height:30px;">176****5287</span>
      </span>
      <span>
        <div class="zhanghu">账户设置</div>
      </span>
    </div>

    <div class="cart">
      <div class="ca">
        <div class="top">
          <div class="chihuo">
            <span>吃货卡 | </span> 吃货豆: <span>1461</span>
          </div>
          <span class="shengji">升级成超级吃货卡，每月得无门槛红包</span>
        </div>
        <div class="bottom"></div>
      </div>
    </div>

    <div class="changyonggongju">
      <div class="block">
        <div class="title">常用工具</div>
        <div class="list">
          <div class="btn">
            <van-icon name="location-o" size="24" />
            <span @click='address'>我的地址</span>
          </div>
          <div class="btn">
            <van-icon name="phone-circle-o" size="24" />
            <span>我的客服</span>
          </div>
          <div class="btn" @click='push_collect'>
            <van-icon name="like-o" size="24" />
            <span>我的收藏</span>
          </div>
          <div class="btn">
            <van-icon name="star-o" size="24" />
            <span>评价有礼</span>
          </div>
        </div>
      </div>
    </div>

    <div class="footer">
      <div class="count">
        <div class="left">
          <div class="top">
            <h3>邀好友赚现金</h3>
            <span>最高得15元</span>
          </div>
          <div class="main">
            <div class="img">
              <img src="https://pic2.zhimg.com/80/v2-fe40bbae84d1a4a1876f5395b506c324_720w.webp?source=1940ef5c" alt="">
            </div>
          </div>
          <div class="bottom">
            <span>去邀请</span>
            <span>查佣金</span>
          </div>
        </div>
        <div class="right">
          <div class="top">
            <h3>饿了么服务号</h3>
            <span>关注后及时接收系统通知</span>
          </div>
          <div class="main">
            <div class="img">
              <img src="https://pic2.zhimg.com/80/v2-fe40bbae84d1a4a1876f5395b506c324_720w.webp?source=1940ef5c" alt="">
            </div>
          </div>
          <div class="bottom">
            <span>立即关注</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    onClickLeft() {
      this.$router.push('/myindex/index')
    },
    push_collect() {
      this.$router.push('/mycollection')
    },
    address() {
      this.$router.push('/myaddress')
    }
  },
}
</script>

<style lang='scss' scoped>
.footer {
  width: 100%;
  height: 200px;
  // background-color: aqua;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  .count {
    width: 94%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .left {
      width: 48%;
      height: 100%;
      border-radius: 20px;
      background-color: #fff;
      border: 1px solid rgba(128, 128, 128, 0.259);
      .top {
        width: 100%;
        height: 70px;
        // background-color: rebeccapurple;
        h3 {
          padding: 6px 10px;
        }
        span {
          color: gray;
          padding: 6px 10px;
          font-size: 14px;
        }
      }
      .main {
        width: 100%;
        height: 70px;
        background-color: orchid;
        display: flex;
        background-color: rgba(128, 128, 128, 0.207);
        justify-content: center;
        align-items: center;
        .img {
          width: 40%;
          height: 70%;
          background-color: red;
          img {
            width: 100%;
            height: 100%;
          }
        }
      }
      .bottom {
        width: 100%;
        height: 60px;
        // flex: 1;
        // background-color: olivedrab;
        display: flex;
        justify-content: space-around;
        align-items: center;

        span {
          width: 80px;
          height: 33px;
          border-radius: 20px;
          // background-color: red;
          border: 1px solid gray;
          text-align: center;
          line-height: 33px;
        }
      }
    }
    .right {
      width: 48%;
      height: 100%;
      background-color: #fff;
      border: 1px solid rgba(128, 128, 128, 0.259);
      border-radius: 20px;
      .top {
        width: 100%;
        height: 70px;
        // background-color: rebeccapurple;
        h3 {
          padding: 6px 10px;
        }
        span {
          padding: 6px 10px;
          color: gray;
          font-size: 14px;
        }
      }
      .main {
        width: 100%;
        height: 70px;
        background-color: rgba(128, 128, 128, 0.207);
        display: flex;
        justify-content: center;
        align-items: center;
        .img {
          width: 40%;
          height: 70%;
          background-color: red;
          img {
            width: 100%;
            height: 100%;
          }
        }
      }
      .bottom {
        width: 100%;
        height: 60px;
        // flex: 1;
        // background-color: olivedrab;
        display: flex;
        justify-content: space-around;
        align-items: center;
        span {
          width: 80px;
          height: 33px;
          border-radius: 20px;
          // background-color: red;
          border: 1px solid gray;
          text-align: center;
          line-height: 33px;
        }
      }
    }
  }
}
.changyonggongju {
  width: 100%;
  height: 120px;
  margin-top: 40px;
  // background-color: aqua;
  .mine {
    background-color: #f5f5f5;
  }
  .block {
    margin: 10px;
    background-color: white;
    .title {
      font-weight: bold;
      padding-left: 10px;
    }
    .list {
      display: flex;
      justify-content: space-around;
      align-content: center;
      .btn {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        i {
          margin-bottom: 10px;
        }
      }
    }
  }
}
.shengji {
  margin-left: 15px;
  color: #fff;
  line-height: 40px;
}
.cart {
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  // background-color: aqua;
  .ca {
    width: 90%;
    height: 100%;
    background-color: #00efff;
    border-radius: 20px;
    .top {
      .chihuo {
        line-height: 30px;
        margin-top: 6px;
        color: #fff;
        span:nth-child(1) {
          font-size: 24px;
          margin-left: 15px;
        }
        span:nth-child(2) {
          font-size: 24px;
        }
      }
    }
  }
}
.my {
  width: 100%;
  height: 100%;

  .mine {
    width: 100%;
    height: 130px;
    // background-color: aqua;
    display: flex;
    justify-content: space-around;
    align-items: center;
    span:nth-child(1) {
      width: 90px;
      height: 90px;
      // background-color: rebeccapurple;
      border: 1px solid gray;
      border-radius: 50%;
      img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
      }
    }
    span:nth-child(2) {
      width: 190px;
      height: 50px;
      span {
        color: gray;
      }
    }
    span:nth-child(3) {
      width: 90px;
      height: 90px;
      // background-color: rebeccapurple;
      display: flex;
      justify-content: center;
      align-items: center;
      .zhanghu {
        width: 100%;
        height: 30px;
        border-radius: 40px;
        border: 1px solid gray;
        text-align: center;
        line-height: 30px;
      }
    }
  }
}
</style>